<?php

/**
 * This is the model class for table "hargabibitpadialat".
 *
 * The followings are the available columns in table 'hargabibitpadialat':
 * @property integer $hbpa_id
 * @property integer $hbpa_bulan
 * @property integer $hbpa_cerecisadane
 * @property integer $hbpa_pandaibesi
 * @property integer $hbpa_tampahnyiru
 * @property integer $hbpa_arit
 * @property integer $hbpa_aniani
 * @property integer $hbpa_sewagaruternak
 * @property integer $hbpa_tahun
 */
class Hargabibitpadialat extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Hargabibitpadialat the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'hargabibitpadialat';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('hbpa_bulan, hbpa_cerecisadane, hbpa_pandaibesi, hbpa_tampahnyiru, hbpa_arit, hbpa_aniani, hbpa_sewagaruternak, hbpa_tahun', 'numerical', 'integerOnly'=>true),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('hbpa_id, hbpa_bulan, hbpa_cerecisadane, hbpa_pandaibesi, hbpa_tampahnyiru, hbpa_arit, hbpa_aniani, hbpa_sewagaruternak, hbpa_tahun', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'hbpa_id' => 'Hbpa',
			'hbpa_bulan' => 'Hbpa Bulan',
			'hbpa_cerecisadane' => 'Hbpa Cerecisadane',
			'hbpa_pandaibesi' => 'Hbpa Pandaibesi',
			'hbpa_tampahnyiru' => 'Hbpa Tampahnyiru',
			'hbpa_arit' => 'Hbpa Arit',
			'hbpa_aniani' => 'Hbpa Aniani',
			'hbpa_sewagaruternak' => 'Hbpa Sewagaruternak',
			'hbpa_tahun' => 'Hbpa Tahun',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('hbpa_id',$this->hbpa_id);
		$criteria->compare('hbpa_bulan',$this->hbpa_bulan);
		$criteria->compare('hbpa_cerecisadane',$this->hbpa_cerecisadane);
		$criteria->compare('hbpa_pandaibesi',$this->hbpa_pandaibesi);
		$criteria->compare('hbpa_tampahnyiru',$this->hbpa_tampahnyiru);
		$criteria->compare('hbpa_arit',$this->hbpa_arit);
		$criteria->compare('hbpa_aniani',$this->hbpa_aniani);
		$criteria->compare('hbpa_sewagaruternak',$this->hbpa_sewagaruternak);
		$criteria->compare('hbpa_tahun',$this->hbpa_tahun);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}